<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="parent">
        <p id="one">hello world</p>
    </div>
    <script>
        var parent = document.getElementById("parent");
        var one = document.getElementById("one");
        var p = document.createElement("p");
        var txt =document.createTextNode("first");
        p.appendChild(txt);// ?
        console.log(p);
        parent.insertBefore(p,one);//在父元素之前插入
    </script>
</body>
</html>